package java69.work721;

import sun.plugin2.message.ShowDocumentMessage;

import java.util.Scanner;

public class PizzaTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PizzaFactory pizzaFactory = new PizzaFactory();
        System.out.println("请选择想要制作的披萨（1.培根披萨 2.海鲜披萨）");
        int ch = sc.nextInt();
        if (ch!=1&&ch!=2){
            System.out.println("输入错误");
        }else {
            System.out.print("请输入披萨大小：");
            int size = sc.nextInt();
            System.out.print("请输入披萨价格：");
            double price = sc.nextInt();
            if (ch==1){
                System.out.println("请输入培根克数：");
                int weight = sc.nextInt();
                pizzaFactory.show1(size,"培根披萨",price,weight);
            }else{
                System.out.println("请输入配料信息：");
                String dosing = sc.next();
                pizzaFactory.show2(size,"海鲜披萨",price,dosing);
            }
        }
    }
}
